<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="next" href="Froc_afp.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Froc" rel="Chapter" href="Froc.html">
<link title="Froc_afp" rel="Chapter" href="Froc_afp.html">
<link title="Froc_ddg" rel="Chapter" href="Froc_ddg.html">
<link title="Froc_dom" rel="Chapter" href="Froc_dom.html">
<link title="Froc_dom_anim" rel="Chapter" href="Froc_dom_anim.html"><link title="Overview" rel="Section" href="#2_Overview">
<link title="Behaviors" rel="Section" href="#2_Behaviors">
<link title="Events" rel="Section" href="#2_Events">
<link title="Derived operations" rel="Section" href="#2_Derivedoperations">
<link title="Variations" rel="Section" href="#2_Variations">
<link title="Debugging" rel="Section" href="#2_Debugging">
<title>Froc</title>
</head>
<body>
<div class="navbar">&nbsp;<a href="index.html">Up</a>
&nbsp;<a href="Froc_afp.html">Next</a>
</div>
<center><h1>Module <a href="type_Froc.html">Froc</a></h1></center>
<br>
<pre><span class="keyword">module</span> Froc: <code class="code">sig</code> <a href="Froc.html">..</a> <code class="code">end</code></pre>Functional reactive programming<br>
<hr width="100%">
<br>
<a name="2_Overview"></a>
<h2>Overview</h2>
<p>

   <code class="code">Froc</code> implements functional reactive programming in the style of
   FrTime / Flapjax (but typed). It uses the dynamic dependency graph
   of Acar et al. (adaptive functional programming). Behaviors are
   presented as monadic values, using ideas from <code class="code">Lwt</code>.
<p>

   A <em>behavior</em> is a monadic value that can change over
   time. Binding a behavior causes the binder to be made a dependency
   of the behavior, and to be re-executed when the behavior changes.
<p>

   An <em>event</em> is a channel over which values may be sent. Listeners
   on the channel are notified when an event occurs (i.e. a value is
   sent on the channel).
<p>

   Sent events are queued; after each event in the queue is sent and
   its listeners notified, the dependency graph is processed to update
   any affected behaviors in a consistent way.
<p>

   When a dependency of a behavior must be re-executed, all resources
   (i.e. binds and notifies) used in the previous execution are
   released, and all cleanup functions set in the previous execution
   are run (see <code class="code">cleanup</code>).<br>
<pre><span class="keyword">val</span> <a name="VALinit"></a>init : <code class="type">unit -> unit</code></pre><div class="info">
Initialize the library. Must be called before any other function.<br>
</div>
<br>
<a name="2_Behaviors"></a>
<h2>Behaviors</h2><br>
<pre><span class="keyword">type</span> <a name="TYPEbehavior"></a><code class="type">'a</code> behavior </pre>
<div class="info">
Type of behaviors of type <code class="code">'a</code>.<br>
</div>

<br><code><span class="keyword">type</span> <a name="TYPEresult"></a><code class="type">'a</code> result = </code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">Value</span> <span class="keyword">of</span> <code class="type">'a</code></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">Fail</span> <span class="keyword">of</span> <code class="type">exn</code></code></td>

</tr></table>

<div class="info">
Type of values of type <code class="code">'a</code> or exception.<br>
</div>

<pre><span class="keyword">val</span> <a name="VALreturn"></a>return : <code class="type">?eq:('a -> 'a -> bool) -> 'a -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">return e</code> is a behavior whose result is <code class="code">e</code>.
<p>

     The optional <code class="code">eq</code> argument gives an equality function; a
     behavior's value is considered changed (and its dependencies
     notified) only if its new value is not <code class="code">eq</code> to its old one. The
     default equality holds iff the values <code class="code">compare</code> to <code class="code">0</code>
     (incomparable values are always not equal).<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfail"></a>fail : <code class="type">exn -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">fail e</code> is a behavior that fails with the exception <code class="code">e</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALbind"></a>bind : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -> ('a -> 'b <a href="Froc.html#TYPEbehavior">behavior</a>) -> 'b <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">bind b f</code> behaves as <code class="code">f</code> applied to the value of <code class="code">b</code>. If <code class="code">b</code>
     fails, <code class="code">bind b f</code> also fails, with the same exception.
<p>

     When the value of a behavior changes, all functions <code class="code">f</code> bound to
     it are re-executed.<br>
</div>
<pre><span class="keyword">val</span> <a name="VAL(>>=)"></a>(&gt;&gt;=) : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -> ('a -> 'b <a href="Froc.html#TYPEbehavior">behavior</a>) -> 'b <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">b &gt;&gt;= f</code> is an alternative notation for <code class="code">bind b f</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALblift"></a>blift : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -> ?eq:('b -> 'b -> bool) -> ('a -> 'b) -> 'b <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">blift b ?eq f</code> is equivalent to <code class="code">bind b (fun v -&gt; return ?eq (f
     v))</code>, but is slightly more efficient.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALlift"></a>lift : <code class="type">?eq:('a -> 'a -> bool) -> ('b -> 'a) -> 'b <a href="Froc.html#TYPEbehavior">behavior</a> -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">lift ?eq f b</code> is equivalent to <code class="code">blift b ?eq f</code>; it can be
     partially applied to lift a function to the monad without yet
     binding it to a behavior.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALcatch"></a>catch : <code class="type">(unit -> 'a <a href="Froc.html#TYPEbehavior">behavior</a>) -> (exn -> 'a <a href="Froc.html#TYPEbehavior">behavior</a>) -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">catch b f</code> behaves the same as <code class="code">b()</code> if <code class="code">b()</code> succeeds. If <code class="code">b()</code>
     fails with some exception <code class="code">e</code>, <code class="code">catch b f</code> behaves as <code class="code">f e</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALcatch_lift"></a>catch_lift : <code class="type">(unit -> 'a <a href="Froc.html#TYPEbehavior">behavior</a>) -><br>       ?eq:('a -> 'a -> bool) -> (exn -> 'a) -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">catch_lift b ?eq f</code> is equivalent to <code class="code">catch b (fun e -&gt; return
     ?eq (f e))</code>, but is slightly more efficient.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALtry_bind"></a>try_bind : <code class="type">(unit -> 'a <a href="Froc.html#TYPEbehavior">behavior</a>) -><br>       ('a -> 'b <a href="Froc.html#TYPEbehavior">behavior</a>) -> (exn -> 'b <a href="Froc.html#TYPEbehavior">behavior</a>) -> 'b <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">try_bind b f g</code> behaves as <code class="code">bind (b()) f</code> if <code class="code">b()</code> succeeds. If
     <code class="code">b()</code> fails with exception <code class="code">e</code>, <code class="code">try_bind b f g</code> behaves as <code class="code">g
     e</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALtry_bind_lift"></a>try_bind_lift : <code class="type">(unit -> 'a <a href="Froc.html#TYPEbehavior">behavior</a>) -><br>       ?eq:('b -> 'b -> bool) -> ('a -> 'b) -> (exn -> 'b) -> 'b <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">try_bind_lift b ?eq f g</code> is equivalent to <code class="code">try_bind b (fun v -&gt;
     return ?eq (f v)) (fun e -&gt; return ?eq (g e))</code>, but is slightly
     more efficient.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALread"></a>read : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -> 'a</code></pre><div class="info">
<code class="code">read b</code> returns the current value of <code class="code">b</code>; if <code class="code">b</code> fails with
     exception <code class="code">e</code> it raises <code class="code">e</code>.
<p>

     Since <code class="code">read</code> doesn't go through the dependency tracking
     machinery, it can get a stale value if called at the wrong
     time. You probably want <code class="code">bind</code> instead.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALread_result"></a>read_result : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -> 'a <a href="Froc.html#TYPEresult">result</a></code></pre><div class="info">
Same as <code class="code">read</code> but returns a result instead of possibly raising
     an exception.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALnotify_b"></a>notify_b : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -> ('a <a href="Froc.html#TYPEresult">result</a> -> unit) -> unit</code></pre><div class="info">
Adds a listener for the result of a behavior, which is called
     whenever the result changes.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALcleanup"></a>cleanup : <code class="type">(unit -> unit) -> unit</code></pre><div class="info">
When called in the context of a binder, adds a function to be
     called when the binder must be re-executed. You can use this to
     clean up external resources.
<p>

     Binds and notifies in the context of a binder are cleaned up
     automatically.<br>
</div>
<br>
<a name="2_Events"></a>
<h2>Events</h2><br>
<pre><span class="keyword">type</span> <a name="TYPEevent"></a><code class="type">'a</code> event </pre>
<div class="info">
Type of events of type <code class="code">'a</code>.<br>
</div>

<pre><span class="keyword">val</span> <a name="VALmake_event"></a>make_event : <code class="type">unit -> 'a <a href="Froc.html#TYPEevent">event</a></code></pre><div class="info">
Makes a new channel for events of type <code class="code">'a</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALnotify_e"></a>notify_e : <code class="type">'a <a href="Froc.html#TYPEevent">event</a> -> ('a <a href="Froc.html#TYPEresult">result</a> -> unit) -> unit</code></pre><div class="info">
Adds a listener on the channel, which is called whenever an event
     is sent on it.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALsend"></a>send : <code class="type">'a <a href="Froc.html#TYPEevent">event</a> -> 'a -> unit</code></pre><div class="info">
<code class="code">send e v</code> calls the listeners of <code class="code">e</code> with <code class="code">Value v</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALsend_exn"></a>send_exn : <code class="type">'a <a href="Froc.html#TYPEevent">event</a> -> exn -> unit</code></pre><div class="info">
<code class="code">send_exn e x</code> calls the listeners of <code class="code">e</code> with <code class="code">Fail x</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALsend_result"></a>send_result : <code class="type">'a <a href="Froc.html#TYPEevent">event</a> -> 'a <a href="Froc.html#TYPEresult">result</a> -> unit</code></pre><div class="info">
<code class="code">send_result e r</code> calls the listeners of <code class="code">e</code> with <code class="code">r</code>.<br>
</div>
<br>
<a name="2_Derivedoperations"></a>
<h2>Derived operations</h2><br>
<pre><span class="keyword">val</span> <a name="VALswitch"></a>switch : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> <a href="Froc.html#TYPEbehavior">behavior</a> -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">switch b</code> behaves as whichever behavior is currently the value of <code class="code">b</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALmerge"></a>merge : <code class="type">'a <a href="Froc.html#TYPEevent">event</a> list -> 'a <a href="Froc.html#TYPEevent">event</a></code></pre><div class="info">
<code class="code">merge es</code> is an event that fires whenever any of the events in <code class="code">e</code> fire.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALmap"></a>map : <code class="type">('a -> 'b) -> 'a <a href="Froc.html#TYPEevent">event</a> -> 'b <a href="Froc.html#TYPEevent">event</a></code></pre><div class="info">
<code class="code">map f e</code> is an event that fires <code class="code">f v</code> whenever <code class="code">e</code> fires <code class="code">v</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfilter"></a>filter : <code class="type">('a -> bool) -> 'a <a href="Froc.html#TYPEevent">event</a> -> 'a <a href="Froc.html#TYPEevent">event</a></code></pre><div class="info">
<code class="code">filter p e</code> is an event that fires <code class="code">v</code> whenever <code class="code">e</code> fires <code class="code">v</code> and <code class="code">p v</code> is true.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALcollect"></a>collect : <code class="type">('a -> 'b -> 'a) -> 'a -> 'b <a href="Froc.html#TYPEevent">event</a> -> 'a <a href="Froc.html#TYPEevent">event</a></code></pre><div class="info">
<code class="code">collect f b e</code> is an event that maintains an internal state <code class="code">s</code>
     (initialized to <code class="code">b</code>); whenever <code class="code">e</code> fires <code class="code">v</code>, <code class="code">s'</code> becomes <code class="code">f s
     v</code>, the event fires <code class="code">s'</code>, and <code class="code">s'</code> becomes the new internal
     state.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALhold"></a>hold : <code class="type">?eq:('a -> 'a -> bool) -> 'a -> 'a <a href="Froc.html#TYPEevent">event</a> -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">hold v e</code> behaves as the last value fired by <code class="code">e</code>, or <code class="code">v</code> if <code class="code">e</code>
     has not yet fired a value (since <code class="code">hold</code> was called). <code class="code">eq</code>
     gives the equality on the resulting behavior.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALhold_result"></a>hold_result : <code class="type">?eq:('a -> 'a -> bool) -> 'a <a href="Froc.html#TYPEresult">result</a> -> 'a <a href="Froc.html#TYPEevent">event</a> -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">hold_result</code> is the same as <code class="code">hold</code> but initialized with a result
     instead of a value.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALchanges"></a>changes : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -> 'a <a href="Froc.html#TYPEevent">event</a></code></pre><div class="info">
<code class="code">changes b</code> fires the value of <code class="code">b</code> whenever it changes.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALwhen_true"></a>when_true : <code class="type">bool <a href="Froc.html#TYPEbehavior">behavior</a> -> unit <a href="Froc.html#TYPEevent">event</a></code></pre><div class="info">
<code class="code">when_true b</code> fires whenever <code class="code">b</code> becomes true.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALcount"></a>count : <code class="type">'a <a href="Froc.html#TYPEevent">event</a> -> int <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><div class="info">
<code class="code">count e</code> behaves as the number of times <code class="code">e</code> has fired (since
     <code class="code">count</code> was called).<br>
</div>
<br>
<a name="2_Variations"></a>
<h2>Variations</h2><br>
<pre><span class="keyword">val</span> <a name="VALbindN"></a>bindN : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> list -> ('a list -> 'b <a href="Froc.html#TYPEbehavior">behavior</a>) -> 'b <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALbliftN"></a>bliftN : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> list -><br>       ?eq:('b -> 'b -> bool) -> ('a list -> 'b) -> 'b <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALliftN"></a>liftN : <code class="type">?eq:('a -> 'a -> bool) -><br>       ('b list -> 'a) -> 'b <a href="Froc.html#TYPEbehavior">behavior</a> list -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALbind2"></a>bind2 : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -> ('a -> 'b -> 'c <a href="Froc.html#TYPEbehavior">behavior</a>) -> 'c <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALblift2"></a>blift2 : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       ?eq:('c -> 'c -> bool) -> ('a -> 'b -> 'c) -> 'c <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALlift2"></a>lift2 : <code class="type">?eq:('a -> 'a -> bool) -><br>       ('b -> 'c -> 'a) -> 'b <a href="Froc.html#TYPEbehavior">behavior</a> -> 'c <a href="Froc.html#TYPEbehavior">behavior</a> -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALbind3"></a>bind3 : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -> ('a -> 'b -> 'c -> 'd <a href="Froc.html#TYPEbehavior">behavior</a>) -> 'd <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALblift3"></a>blift3 : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       ?eq:('d -> 'd -> bool) -> ('a -> 'b -> 'c -> 'd) -> 'd <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALlift3"></a>lift3 : <code class="type">?eq:('a -> 'a -> bool) -><br>       ('b -> 'c -> 'd -> 'a) -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -> 'c <a href="Froc.html#TYPEbehavior">behavior</a> -> 'd <a href="Froc.html#TYPEbehavior">behavior</a> -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALbind4"></a>bind4 : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'd <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       ('a -> 'b -> 'c -> 'd -> 'e <a href="Froc.html#TYPEbehavior">behavior</a>) -> 'e <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALblift4"></a>blift4 : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'd <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       ?eq:('e -> 'e -> bool) -> ('a -> 'b -> 'c -> 'd -> 'e) -> 'e <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALlift4"></a>lift4 : <code class="type">?eq:('a -> 'a -> bool) -><br>       ('b -> 'c -> 'd -> 'e -> 'a) -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -> 'd <a href="Froc.html#TYPEbehavior">behavior</a> -> 'e <a href="Froc.html#TYPEbehavior">behavior</a> -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALbind5"></a>bind5 : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'd <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'e <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       ('a -> 'b -> 'c -> 'd -> 'e -> 'f <a href="Froc.html#TYPEbehavior">behavior</a>) -> 'f <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALblift5"></a>blift5 : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'd <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'e <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       ?eq:('f -> 'f -> bool) -><br>       ('a -> 'b -> 'c -> 'd -> 'e -> 'f) -> 'f <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALlift5"></a>lift5 : <code class="type">?eq:('a -> 'a -> bool) -><br>       ('b -> 'c -> 'd -> 'e -> 'f -> 'a) -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'd <a href="Froc.html#TYPEbehavior">behavior</a> -> 'e <a href="Froc.html#TYPEbehavior">behavior</a> -> 'f <a href="Froc.html#TYPEbehavior">behavior</a> -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALbind6"></a>bind6 : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'd <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'e <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'f <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       ('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g <a href="Froc.html#TYPEbehavior">behavior</a>) -> 'g <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALblift6"></a>blift6 : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'd <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'e <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'f <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       ?eq:('g -> 'g -> bool) -><br>       ('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g) -> 'g <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALlift6"></a>lift6 : <code class="type">?eq:('a -> 'a -> bool) -><br>       ('b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'a) -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'd <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'e <a href="Froc.html#TYPEbehavior">behavior</a> -> 'f <a href="Froc.html#TYPEbehavior">behavior</a> -> 'g <a href="Froc.html#TYPEbehavior">behavior</a> -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALbind7"></a>bind7 : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'd <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'e <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'f <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'g <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       ('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h <a href="Froc.html#TYPEbehavior">behavior</a>) -><br>       'h <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALblift7"></a>blift7 : <code class="type">'a <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'd <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'e <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'f <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'g <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       ?eq:('h -> 'h -> bool) -><br>       ('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h) -> 'h <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><pre><span class="keyword">val</span> <a name="VALlift7"></a>lift7 : <code class="type">?eq:('a -> 'a -> bool) -><br>       ('b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h -> 'a) -><br>       'b <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'c <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'd <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'e <a href="Froc.html#TYPEbehavior">behavior</a> -><br>       'f <a href="Froc.html#TYPEbehavior">behavior</a> -> 'g <a href="Froc.html#TYPEbehavior">behavior</a> -> 'h <a href="Froc.html#TYPEbehavior">behavior</a> -> 'a <a href="Froc.html#TYPEbehavior">behavior</a></code></pre><br>
<a name="2_Debugging"></a>
<h2>Debugging</h2><br>
<pre><span class="keyword">val</span> <a name="VALset_exn_handler"></a>set_exn_handler : <code class="type">(exn -> unit) -> unit</code></pre><div class="info">
Set an exception handler which is called on exceptions from
     notification functions.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALset_debug"></a>set_debug : <code class="type">(string -> unit) -> unit</code></pre><div class="info">
Set a function for showing library debugging.<br>
</div>
</body></html>